package pucp.carpooling;



import com.actionbarsherlock.app.SherlockFragment;
import pucp.carpooling.R;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import android.view.View.OnClickListener;

public class FragmentTab_publicar_aviso extends SherlockFragment implements
		OnClickListener {
	public Button btnPublicarAvisoConductor;
	public Button btnPublicarAvisoPasajero;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		
		View view = inflater.inflate(R.layout.fragmenttab_publicaraviso,
				container, false);

		
		btnPublicarAvisoConductor = (Button) view
				.findViewById(R.id.btnPublicarAvisoConductor);
		btnPublicarAvisoPasajero = (Button) view
				.findViewById(R.id.btnPublicarAvisoPasajero);

		btnPublicarAvisoPasajero.setOnClickListener(this);
		btnPublicarAvisoConductor.setOnClickListener(this);
		return view;
	}

	@Override
	public void onClick(View v) {
		Intent i = new Intent(getActivity(),
				RegistrarAvisoConductorActivity.class);
		Intent j = new Intent(getActivity(),
				RegistrarAvisoPasajeroActivity.class);
		switch (v.getId()) {
		case R.id.btnPublicarAvisoConductor:
			startActivity(i);
			break;
		case R.id.btnPublicarAvisoPasajero:
			startActivity(j);
			break;

		default:
			break;
		}
	}
}
